﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NodeBasedSkillEditor.Model.CommandHistory
{
    public class Cmd_DeleteNodes : CommandRecord
    {
        public override ECommandType CmdType => ECommandType.DeleteNodes;

        public string DagJson;
        public uint EntryNodeId = DAGHelper.InvalidNodeId;

        public Cmd_DeleteNodes(DAG_Data data, uint delEntryId)
        {
            DagJson = SwifterJson.XFormatter.ToJson(data);
            EntryNodeId = delEntryId;
        }

        public DAG_Data GetDagData()
        {
            var data = SwifterJson.XFormatter.FromJson<DAG_Data>(DagJson);
            return data;
        }
    }
}
